package com.example.voting_master.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.*;
import org.springframework.boot.context.properties.bind.DefaultValue;

import java.io.Serializable;

@Data
@TableName("candidate")
//@Builder
public class Candidate implements Serializable {
    /**
     * 自增id
     */
    @TableId(value = "id",type = IdType.AUTO)
    private Long id;

    /**
     * 候选人名字
     */
    @TableField(value = "name")
    private String name;

    /**
     * 候选人年龄
     */
    @TableField(value = "age")
    private Integer age;

    /**
     * 候选人照片地址
     */
    @TableField(value = "photo_url")
    private String photoURL;

    /**
     * 候选人工作地点
     */
    @TableField(value = "workplace")
    private String workplace;

    /**
     * 候选人介绍
     */
    @TableField(value = "introduction")
    private String introduction;

    /**
     * 候选人额外信息
     */
    @TableField(value = "extra_info")
    private String extraInfo;

    /**
     * 候选人得票数
     * */
    @TableField(exist = false)
    private Long votes;

    /*public Candidate(){
        super();
    }*/

}
